/*
** my_func.c for alum1 in /home/nadali_t//local/Projets/CprgElem/alum1
** 
** Made by thomas nadalie
** Login   <nadali_t@epitech.net>
** 
** Started on  Mon Feb  6 14:50:09 2012 thomas nadalie
** Last update Mon Feb  6 16:48:09 2012 thomas nadalie
*/

#include	"my.h"

void	my_put_err(char *error)
{
  write(2, error, my_strlen(error));
}

char            *my_strdup(char *src)
{
  int           i;
  char		*tmp;

  i =   0;
  tmp = malloc(my_strlen(src));
  while (src[i])
    {
      tmp[i] = src[i];
      i = i + 1;
    }
  tmp[i] = '\0';
  my_putstr(tmp);
  free(tmp);
  return (tmp);
}

void	my_bzero(char *str)
{
  int	i;

  i = 0;
  while (str[i])
    str[i++] == '\0';
}

int	char_to_int(char nbr)
{
  int	nb;

  nb = (nbr - '0');
  return (nb);
}
